<include file="public:header" />
<form action="{:u('items_cate/edit')}" method="post" name="myform" id="myform"  enctype="multipart/form-data" style="margin-top:10px;">
  <div class="pad-10">
    <div class="col-tab">
      <ul class="tabBut cu-li">
        <li id="tab_setting_1" class="on" onclick="SwapTab('setting','on','',3,1);">基本信息</li>
        <li id="tab_setting_3" onclick="SwapTab('setting','on','',2,2);">SEO设置</li>
      </ul>
      <div id="div_setting_1" class="contentList pad-10">
        <table width="100%" cellpadding="2" cellspacing="1" class="table_form">
          <tr>
            <th></th>
            <td><input type="hidden" name="id" class="input-text" value="{$items_cate_info.id}"></td>
          </tr>
          <tr>
            <th>上级分类：</th>
            <td>
            <select name="pid" style="width:150px;">
                  <option value="0" <if condition="$items_cate_info.pid eq 0">selected="selected"</if>>--顶级分类--</option>
                  <volist name="items_cate_list['parent']" id="val">
                  <option value="{$val.id}" <if condition="$items_cate_info.pid eq $val['id']">selected="selected"</if>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$val.name}</option>
                  </volist>
            </select>
            </td>
          </tr>
          <tr>
            <th width="100">分类名称 :</th>
            <td><input type="text" name="name" id="name" class="input-text" value="{$items_cate_info.name}"></td>
          </tr>
          <tr>
          	<th>商品图片 :</th>
            <td>
				<if condition="$items_cate_info['img'] neq ''">
	                <img src="../includes/data/items_cate/{$items_cate_info.img}" /><br/>
                </if>
            	<input type="file" name="img" id="img" class="input-text" size=21 />
            </td>
          </tr>            
          <tr>
            <th width="100">排序值 :</th>
            <td><input type="text" name="ordid" id="ordid" class="input-text" size="4" value="{$items_cate_info.ordid}" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"></td>
          </tr>
          <tr>
            <th>首页显示 :</th>
             <td>
             	<input type="radio" name="is_hots" id="is_hots" class="radio_style" value="1" <if condition="$items_cate_info['is_hots'] eq '1'">checked="checked"</if> > &nbsp;是&nbsp;&nbsp;&nbsp;
        		<input type="radio" name="is_hots" id="is_hots" class="radio_style" value="0" <if condition="$items_cate_info['is_hots'] eq '0'">checked="checked"</if>> &nbsp;否
             </td>
          </tr>
		  <tr>
            <th>审核状态 :</th>
             <td>
             	<input type="radio" name="status" id="status" class="radio_style" value="1" <if condition="$items_cate_info['status'] eq '1'">checked="checked"</if> > &nbsp;是&nbsp;&nbsp;&nbsp;
        		<input type="radio" name="status" id="status" class="radio_style" value="0" <if condition="$items_cate_info['status'] eq '0'">checked="checked"</if>> &nbsp;否
             </td>
          </tr>
        </table>
      </div>
      <div id="div_setting_2" class="contentList pad-10 hidden">
        <table width="100%" cellpadding="2" cellspacing="1" class="table_form">
          <tr>
            <th width="100">Title :</th>
            <td><input type="text" name="seo_title" id="seo_title" class="input-text" value="{$items_cate_info.seo_title}" size="50"></td>
          </tr>
          <tr>
            <th width="100">Keywords :</th>
            <td><input type="text" name="seo_keys" id="seo_keys" class="input-text" value="{$items_cate_info.seo_keys}" size="50"></td>
          </tr>
          <tr>
            <th width="100">Description :</th>
            <td><textarea name="seo_desc" cols="47" rows="4">{$items_cate_info.seo_desc}</textarea></td>
          </tr>
        </table>
      </div>
      <div class="bk15"></div>
      <div class="btn"><input type="submit" value="{$Think.lang.submit}"  name="dosubmit" class="button" id="dosubmit"></div>
    </div>
  </div>
</form>
<script type="text/javascript">
function SwapTab(name,cls_show,cls_hide,cnt,cur){
    for(i=1;i<=cnt;i++){
		if(i==cur){
			 $('#div_'+name+'_'+i).show();
			 $('#tab_'+name+'_'+i).attr('class',cls_show);
		}else{
			 $('#div_'+name+'_'+i).hide();
			 $('#tab_'+name+'_'+i).attr('class',cls_hide);
		}
	}
}
</script>
</body></html>